package com.xiaohai.exceptionhandle.exception;

import ch.qos.logback.core.status.Status;
import com.xiaohai.exceptionhandle.common.JsonResponse;
import com.xiaohai.exceptionhandle.common.StatusCode;

/**
 * 自定义业务异常
 */
public class BussnessException extends RuntimeException{
    private String code =StatusCode.error;
    public BussnessException(String message) {
        super(message);
    }

    public BussnessException(String errorCode,String message) {
        super(message);
        code=errorCode;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
